import request from '@/utils/request'
// 获取文章列表
export const ArticleGetListService = (obj) => {
  return request.get('/my/article/list', {
    params: {
      pagenum: obj.pageNum,
      pagesize: obj.pageSize,
      cate_id: obj.cateId,
      state: obj.state
    }
  })
}

// 发布文章
export const ArticleAddService = (formData) => {
  return request.post('/my/article/add', formData)
}

// 获取文章详情
export const ArticleGetProfileService = (id) => {
  return request.get(`/my/article/info?id=${id}`)
}

// 删除文章
export const ArticleDeleteService = (id) => {
  return request.delete(`/my/article/info?id=${id}`)
}

// 更新文章
export const ArticleUpdateService = (formData) => {
  return request.put('/my/article/info', formData)
}
